﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using AMS.UI.Forms;
using AMS.DataAccess.Trademark.Interfaces;
using AMS.ComponentModel;

namespace AMS.Trademark.Management
{
    /// <summary>
    /// 
    /// </summary>
    public partial class FrmDocsRepository : BaseForm
    {
        /// <summary>
        /// 
        /// </summary>
        public FrmDocsRepository()
        {
            InitializeComponent();
            ApplyDelayLoadData();
        }

        /// <summary>
        /// 
        /// </summary>
        protected override void DelayLoadData()
        {
            grid.Init("TMDocument");
            DoDataBind();
        }

        private void DoDataBind()
        {
            IDocManager docManager = ObjectUtility.GetObject<IDocManager>("DocManager");
            DataTable dt = docManager.GetAllDocuments(null);
            grid.DataBind(dt);
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
        }
    }
}
